package com.bw.gmall.realtime.app.dws;
//自定义函数
import org.apache.flink.table.annotation.DataTypeHint;
import org.apache.flink.table.annotation.FunctionHint;
import org.apache.flink.table.functions.TableFunction;
import org.apache.flink.types.Row;

import java.util.List;

// function with overloaded evaluation methods
// but globally defined output type
@FunctionHint(output = @DataTypeHint("ROW<s STRING>"))
public  class UDTFTest extends TableFunction<Row> {

    public void eval(String str) {
        List<String> list = IKTest.ik(str);
        for (String word : list) {
            collect(Row.of(word));
        }
    }

    }